<template>
	<div id="app">
		<router-view v-cloak></router-view>
		<helper></helper>
	</div>
</template>

<script>
	import common from "@/common/common.js";
	import config from "@/common/config.js";
	import helper from "@/common/helper/helper.vue";

	export default {
		name: "app",
		data() {
			return {};
		},
		components: {
			helper
		},
		computed: {
			projectName: function() {
				return this.$store.state.projectName;
			},
		},
		created: function() {
			//console.log('app.vue created');
			window.appVue = this;
			document.title = this.projectName;
			// common.tool.post("/api/Login").then((data) => {
			//   alert(data);
			// });
			config.appVueCreated(this);
		},
		mounted: function() {
			//console.log('app.vue mounted');
		},
		methods: {},
	};
	// 禁止手机端扩大和缩小手势
	window.onload = function() {
		document.addEventListener("touchstart", function(event) {
			if (!!event && event.touches.length > 1) {
				event.preventDefault();
			}
		});
		document.addEventListener("gesturestart", function(event) {
			if (!!event) {
				event.preventDefault();
			}
		});
	};
</script>

<style lang="scss">
	.el-scrollbar {

		//element-ui 下拉框在ios上 点击两次才能选中
		>.el-scrollbar__bar {
			opacity: 1 !important;
		}
	}

	#app {
		/* font-family: 'Avenir', Helvetica, Arial, sans-serif; */
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		/* text-align: center; */
		/* color: #2c3e50; */
		margin-top: 0px;
	}
</style>
